name="abcdefg"
print(name.index("cd"))
print(name.rindex("cd"))
print(name.index("gg"))
print(name.rindex("gg"))